package com.raos.validation.model;

import com.raos.validation.annotation.ListNotHaveNull;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * 角色 实体类
 *
 * @author RaoShuang
 * @emil 991207823@qq.com
 * @date 2021/5/20 09:33
 */
@Data
public class SysRole {

    private Long roleId;

    @NotBlank(message = "角色名不能为空")
    private String name;

    @NotEmpty(message = "资源列表不能为空")
    @ListNotHaveNull(message = "List 中不能含有null元素")
    @Valid
    private List<String> paths;

}
